<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据看板 - 企业福利商城管理系统</title>
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            display: flex;
        }
        
        /* 侧边栏 */
        .sidebar {
            width: 220px;
            background-color: white;
            height: 100vh;
            box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
            position: fixed;
            left: 0;
            top: 0;
            z-index: 100;
            display: flex;
            flex-direction: column;
        }
        
        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .admin-logo {
            display: flex;
            align-items: center;
        }
        
        .admin-logo-icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, #f56c6c 0%, #f78989 100%);
            border-radius: 8px;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-right: 10px;
            color: white;
            font-weight: bold;
            font-size: 18px;
        }
        
        .admin-logo-text {
            font-size: 18px;
            font-weight: 600;
            color: #f56c6c;
        }
        
        .sidebar-menu {
            flex: 1;
            padding: 20px 0;
            overflow-y: auto;
        }
        
        .menu-item {
            padding: 12px 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: all 0.3s;
        }
        
        .menu-item:hover {
            background-color: #f5f7fa;
        }
        
        .menu-item.active {
            background-color: #fef0f0;
            color: #f56c6c;
            border-right: 3px solid #f56c6c;
        }
        
        .menu-icon {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }
        
        .sidebar-footer {
            padding: 15px 20px;
            border-top: 1px solid #f0f0f0;
            display: flex;
            align-items: center;
        }
        
        .admin-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: #f56c6c;
            display: flex;
            justify-content: center;
            align-items: center;
            color: white;
            font-weight: bold;
            margin-right: 10px;
        }
        
        .admin-info {
            flex: 1;
        }
        
        .admin-name {
            font-weight: 500;
            font-size: 14px;
        }
        
        .admin-role {
            color: #909399;
            font-size: 12px;
        }
        
        /* 主内容区域 */
        .main-content {
            flex: 1;
            margin-left: 220px;
            padding: 20px;
        }
        
        /* 顶部导航 */
        .top-nav {
            background-color: white;
            border-radius: 12px;
            padding: 15px 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .page-title {
            font-size: 22px;
            font-weight: 600;
            display: flex;
            align-items: center;
        }
        
        .page-title-icon {
            width: 32px;
            height: 32px;
            background-color: #f56c6c;
            border-radius: 6px;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-right: 10px;
            color: white;
        }
        
        .top-actions {
            display: flex;
            gap: 10px;
        }
        
        .action-btn {
            padding: 8px 16px;
            background-color: white;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .action-btn.primary {
            background-color: #f56c6c;
            color: white;
            border-color: #f56c6c;
        }
        
        /* 指标卡片区域 */
        .metrics-section {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .metric-card {
            background-color: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
        }
        
        .metric-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .metric-title {
            color: #909399;
            font-size: 14px;
        }
        
        .metric-icon {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: white;
        }
        
        .metric-value {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 5px;
        }
        
        .metric-trend {
            font-size: 12px;
            display: flex;
            align-items: center;
        }
        
        .trend-up {
            color: #67c23a;
        }
        
        .trend-down {
            color: #f56c6c;
        }
        
        /* 图表区域 */
        .charts-section {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .chart-card {
            background-color: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        .chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .chart-title {
            font-weight: 600;
        }
        
        .chart-actions {
            display: flex;
            gap: 10px;
        }
        
        .chart-action {
            padding: 4px 8px;
            background-color: #f5f7fa;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
        }
        
        .chart-action.active {
            background-color: #f56c6c;
            color: white;
        }
        
        .chart-container {
            height: 300px;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #f9f9f9;
            border-radius: 8px;
            color: #909399;
        }
        
        /* 数据表格区域 */
        .tables-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        
        .table-card {
            background-color: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        .table-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .table-title {
            font-weight: 600;
        }
        
        .table-view-all {
            color: #f56c6c;
            text-decoration: none;
            font-size: 14px;
        }
        
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .data-table th {
            text-align: left;
            padding: 12px 0;
            border-bottom: 1px solid #f0f0f0;
            color: #909399;
            font-weight: 500;
        }
        
        .data-table td {
            padding: 12px 0;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .status-badge {
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
        }
        
        .status-success {
            background-color: #f0f9ff;
            color: #409EFF;
        }
        
        .status-warning {
            background-color: #fdf6ec;
            color: #e6a23c;
        }
        
        .status-danger {
            background-color: #fef0f0;
            color: #f56c6c;
        }
        
        /* 响应式设计 */
        @media (max-width: 1200px) {
            .metrics-section {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .charts-section {
                grid-template-columns: 1fr;
            }
            
            .tables-section {
                grid-template-columns: 1fr;
            }
        }
        
        @media (max-width: 768px) {
            .sidebar {
                width: 60px;
            }
            
            .sidebar-header .admin-logo-text,
            .menu-item span,
            .admin-info {
                display: none;
            }
            
            .main-content {
                margin-left: 60px;
            }
            
            .metrics-section {
                grid-template-columns: 1fr;
            }
        }
        
        @media (max-width: 480px) {
            .top-nav {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .top-actions {
                margin-top: 15px;
                width: 100%;
                justify-content: space-between;
            }
            
            .action-btn {
                flex: 1;
                text-align: center;
            }
        }
    </style>
</head>
<body>
    <!-- 侧边栏 -->
    <div class="sidebar">
        <div class="sidebar-header">
            <div class="admin-logo">
                <div class="admin-logo-icon">管</div>
                <div class="admin-logo-text">管理系统</div>
            </div>
        </div>
        
        <div class="sidebar-menu">
            <div class="menu-item active">
                <div class="menu-icon">📊</div>
                <span>数据看板</span>
            </div>
            <div class="menu-item">
                <div class="menu-icon">👥</div>
                <span>员工管理</span>
            </div>
            <div class="menu-item">
                <div class="menu-icon">🎁</div>
                <span>福利卡管理</span>
            </div>
            <div class="menu-item">
                <div class="menu-icon">🛒</div>
                <span>商品管理</span>
            </div>
            <div class="menu-item">
                <div class="menu-icon">📦</div>
                <span>订单管理</span>
            </div>
            <div class="menu-item">
                <div class="menu-icon">📈</div>
                <span>数据统计</span>
            </div>
            <div class="menu-item">
                <div class="menu-icon">⚙️</div>
                <span>系统设置</span>
            </div>
        </div>
        
        <div class="sidebar-footer">
            <div class="admin-avatar">管</div>
            <div class="admin-info">
                <div class="admin-name">张管理员</div>
                <div class="admin-role">超级管理员</div>
            </div>
        </div>
    </div>
    
    <!-- 主内容区域 -->
    <div class="main-content">
        <!-- 顶部导航 -->
        <div class="top-nav">
            <h1 class="page-title">
                <div class="page-title-icon">📊</div>
                数据看板
            </h1>
            
            <div class="top-actions">
                <button class="action-btn">数据导出</button>
                <button class="action-btn">刷新数据</button>
                <button class="action-btn primary">生成报表</button>
            </div>
        </div>
        
        <!-- 指标卡片区域 -->
        <div class="metrics-section">
            <div class="metric-card">
                <div class="metric-header">
                    <div class="metric-title">福利发放总额</div>
                    <div class="metric-icon" style="background-color: #409EFF;">💰</div>
                </div>
                <div class="metric-value">¥ 286,500</div>
                <div class="metric-trend trend-up">
                    <span>↑ 12.5%</span>
                    <span>较上月</span>
                </div>
            </div>
            
            <div class="metric-card">
                <div class="metric-header">
                    <div class="metric-title">员工兑换率</div>
                    <div class="metric-icon" style="background-color: #67C23A;">👥</div>
                </div>
                <div class="metric-value">78.3%</div>
                <div class="metric-trend trend-up">
                    <span>↑ 5.2%</span>
                    <span>较上月</span>
                </div>
            </div>
            
            <div class="metric-card">
                <div class="metric-header">
                    <div class="metric-title">人均消费</div>
                    <div class="metric-icon" style="background-color: #E6A23C;">📊</div>
                </div>
                <div class="metric-value">¥ 856</div>
                <div class="metric-trend trend-down">
                    <span>↓ 2.1%</span>
                    <span>较上月</span>
                </div>
            </div>
            
            <div class="metric-card">
                <div class="metric-header">
                    <div class="metric-title">活跃员工数</div>
                    <div class="metric-icon" style="background-color: #F56C6C;">🔥</div>
                </div>
                <div class="metric-value">1,248</div>
                <div class="metric-trend trend-up">
                    <span>↑ 8.7%</span>
                    <span>较上月</span>
                </div>
            </div>
        </div>
        
        <!-- 图表区域 -->
        <div class="charts-section">
            <div class="chart-card">
                <div class="chart-header">
                    <div class="chart-title">月度福利发放与兑换趋势</div>
                    <div class="chart-actions">
                        <div class="chart-action active">月</div>
                        <div class="chart-action">季</div>
                        <div class="chart-action">年</div>
                    </div>
                </div>
                <div class="chart-container">
                    <!-- 这里应该是一个折线图 -->
                    <div>月度福利发放与兑换趋势图表区域</div>
                </div>
            </div>
            
            <div class="chart-card">
                <div class="chart-header">
                    <div class="chart-title">商品类别分布</div>
                    <div class="chart-actions">
                        <div class="chart-action active">销量</div>
                        <div class="chart-action">金额</div>
                    </div>
                </div>
                <div class="chart-container">
                    <!-- 这里应该是一个饼图 -->
                    <div>商品类别分布图表区域</div>
                </div>
            </div>
        </div>
        
        <!-- 数据表格区域 -->
        <div class="tables-section">
            <div class="table-card">
                <div class="table-header">
                    <div class="table-title">热门商品TOP10</div>
                    <a href="#" class="table-view-all">查看全部</a>
                </div>
                
                <table class="data-table">
                    <thead>
                        <tr>
                            <th>商品名称</th>
                            <th>销量</th>
                            <th>销售额</th>
                            <th>状态</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>金龙鱼黄金比例食用调和油5L</td>
                            <td>1,248</td>
                            <td>¥ 112,310</td>
                            <td><span class="status-badge status-success">热销</span></td>
                        </tr>
                        <tr>
                            <td>福临门水晶米10kg</td>
                            <td>986</td>
                            <td>¥ 67,541</td>
                            <td><span class="status-badge status-success">热销</span></td>
                        </tr>
                        <tr>
                            <td>中秋月饼礼盒装</td>
                            <td>754</td>
                            <td>¥ 119,132</td>
                            <td><span class="status-badge status-warning">促销</span></td>
                        </tr>
                        <tr>
                            <td>蓝月亮洗衣液套装</td>
                            <td>632</td>
                            <td>¥ 28,954</td>
                            <td><span class="status-badge status-success">热销</span></td>
                        </tr>
                        <tr>
                            <td>有机蔬菜礼盒</td>
                            <td>521</td>
                            <td>¥ 40,638</td>
                            <td><span class="status-badge status-success">热销</span></td>
                        </tr>
                    </tbody>
                </table>
            </div>
            
            <div class="table-card">
                <div class="table-header">
                    <div class="table-title">最近操作记录</div>
                    <a href="#" class="table-view-all">查看全部</a>
                </div>
                
                <table class="data-table">
                    <thead>
                        <tr>
                            <th>操作时间</th>
                            <th>操作人员</th>
                            <th>操作内容</th>
                            <th>状态</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>2023-09-20 14:30</td>
                            <td>张管理员</td>
                            <td>生成500张中秋福利卡</td>
                            <td><span class="status-badge status-success">成功</span></td>
                        </tr>
                        <tr>
                            <td>2023-09-18 10:15</td>
                            <td>李管理员</td>
                            <td>上架10款新品商品</td>
                            <td><span class="status-badge status-success">成功</span></td>
                        </tr>
                        <tr>
                            <td>2023-09-15 16:45</td>
                            <td>张管理员</td>
                            <td>调整商品分类结构</td>
                            <td><span class="status-badge status-warning">部分成功</span></td>
                        </tr>
                        <tr>
                            <td>2023-09-12 09:20</td>
                            <td>王管理员</td>
                            <td>导出月度报表</td>
                            <td><span class="status-badge status-success">成功</span></td>
                        </tr>
                        <tr>
                            <td>2023-09-10 11:05</td>
                            <td>张管理员</td>
                            <td>批量发放季度福利卡</td>
                            <td><span class="status-badge status-success">成功</span></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 菜单项点击效果
            const menuItems = document.querySelectorAll('.menu-item');
            menuItems.forEach(item => {
                item.addEventListener('click', function() {
                    menuItems.forEach(i => i.classList.remove('active'));
                    this.classList.add('active');
                });
            });
            
            // 图表时间范围切换
            const chartActions = document.querySelectorAll('.chart-action');
            chartActions.forEach(action => {
                action.addEventListener('click', function() {
                    const parent = this.closest('.chart-actions');
                    parent.querySelectorAll('.chart-action').forEach(a => a.classList.remove('active'));
                    this.classList.add('active');
                });
            });
            
            // 操作按钮点击事件
            const actionBtns = document.querySelectorAll('.action-btn');
            actionBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    if (this.textContent === '数据导出') {
                        alert('数据导出功能正在开发中...');
                    } else if (this.textContent === '刷新数据') {
                        alert('数据已刷新');
                    } else if (this.textContent === '生成报表') {
                        alert('报表生成成功，已发送到您的邮箱');
                    }
                });
            });
            
            // 模拟数据更新
            function updateMetrics() {
                // 这里可以添加定期更新指标数据的逻辑
            }
            
            // 每30秒更新一次数据
            setInterval(updateMetrics, 30000);
        });
    </script>
</body>
</html>